<?php
	//session_destroy();
	session_start();
	$_SESSION['value']="none";
	class EditPaymentManager{

		public function editStudentForm1($str,$param1,$num){
			$num = $num-1;
			$conn = oci_connect("naiad", "1234", "localhost/XE");
			if((strcmp($str,"snum"))==0){
				$s = oci_parse($conn, "select STUDENTNO, TERM, RECEIPTNO, PERIODCOVERED, DORMFEE, APPLIANCEFEE, TRANSFEE, DATEPAID, REMARKS,DURATION FROM PAYMENT where STUDENTNO like '".$param1."'");
			}				
			
			oci_execute($s);
			$nrows = oci_fetch_all($s, $results);
			if($num>=$nrows||$num<0){
				echo"<script>alert(\"Invalid payment number!\")</script>";
				
			}else{
				$i = $num;
				if($nrows!=0){
					$_SESSION['studentno']=$results['STUDENTNO'][$i];
					$_SESSION['term']=$results['TERM'][$i];
					$_SESSION['receipt']=$results['RECEIPTNO'][$i];
					$_SESSION['periodcovered']=$results['DURATION'][$i];
					$_SESSION['months']=$results['PERIODCOVERED'][$i];
					$_SESSION['dormfee']=$results['DORMFEE'][$i];
					$_SESSION['appfee']=$results['APPLIANCEFEE'][$i];
					$_SESSION['transfee']=$results['TRANSFEE'][$i];
					$_SESSION['datepaid']=$results['DATEPAID'][$i];
					$_SESSION['remarks']=$results['REMARKS'][$i];
					return 1;
				}else{
					return 0;
				}
			}

			
			
			
		}//end of editStudentInfo function
			
	}//end of EditStudentManager class

?>